var e = getApp();

Page({
    data: {
        money: "",
        order_id: ""
    },
    onLoad: function(e) {
        this.setData({
            order_id: e.order_id
        }), this.getConsumePacket();
    },
    onReady: function() {},
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    onShareAppMessage: function() {},
    toPacketList: function() {
        wx.redirectTo({
            url: "/packageE/ConsumePacket/index/index"
        });
    },
    getConsumePacket: function() {
        var t = this, o = {
            order_id: this.data.order_id.split(",")
        }, n = e.getNetAddresss("plugin.consume-red-packet.Frontend.Modules.Packet.Controllers.receive.index");
        e._postNetWork({
            url: n,
            data: o,
            success: function(e) {
                var o = e.data;
                1 == o.result ? t.setData({
                    money: o.data.packet_amount
                }) : wx.showToast({
                    icon: "none",
                    title: o.msg,
                    duration: 1500
                });
            },
            fail: function(e) {
                console.log(e);
            }
        });
    }
});